package com.wink_172.library.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.wink_172.library.R;

public
/**
水平虚线    垂直虚线
 https://blog.csdn.net/chen_md/article/details/83215322?ops_request_misc=%25257B%252522request%25255Fid%252522%25253A%252522161136812316780255224008%252522%25252C%252522scm%252522%25253A%25252220140713.130102334..%252522%25257D&request_id=161136812316780255224008&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-83215322.first_rank_v2_pc_rank_v29&utm_term=android%20%E8%99%9A%E7%BA%BF
 */
  class DottedView extends TextView {

    public DottedView(Context context) {
        super(context);
    }

    public DottedView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public DottedView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        initView();
    }

    private void initView(){

    }

    public void setType(int type){
        if(type==0){
            setBackgroundResource(R.drawable.line_horizontal);

        }else {
            setBackgroundResource(R.drawable.line_vertical);
        }

    }
}
